<?php

$ch = curl_init();
$api_url = "http://text-processing.com/api/tag/?";
$api_url = "http://localhost:1234/".urlencode('create a form with email and password');
$params = "text=please, create a website";

$complete_url = $api_url;
curl_setopt($ch, CURLOPT_URL, $complete_url);
curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-type: text/plain'));
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS,  $params);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$output = curl_exec($ch);

curl_close($ch);

print $output;
$output_json = json_decode($output);
print "<pre>";
print_r($output_json);
#ws
?>
